<template>
  <div class="tip-banner" v-if="text">
    <i class="el-icon-warning-outline icon"></i>
    <span class="tip-text">{{ text }}</span>
  </div>
</template>

<script>
export default {
  name: 'TipBanner',
  props: {
    text: { type: String, default: '' }
  }
}
</script>

<style lang="scss" scoped>
.tip-banner {
  float: left;
  display: flex;
  align-items: center;
  margin-left: 20px;
  line-height: 50px;
  color: #f56c6c;
  font-size: 14px;
  font-weight: 600;
}
.icon {
  margin-right: 6px;
  font-size: 16px;
}
.tip-text {
  white-space: nowrap;
}
@media (max-width: 768px) {
  .tip-banner {
    float: none;
    display: block;
    margin: 6px 12px 0;
    line-height: 22px;
    font-size: 13px;
    white-space: normal;
  }
}
</style>
